package cn.softwin.dao;

import cn.softwin.pojo.CstCustomer;
import cn.softwin.pojo.CstCustomerDetail;

import java.util.List;

public interface CustumerDao {
    
    /**
     * Description: 
     * Author: zhangxiangkai
     * Params: [cstCustomer]
     * ReturnType: java.lang.Boolean
     * Time: 2021/2/17-16:48
     */
    public Boolean addCustumer(CstCustomer cstCustomer); 
    
    /**
     * Description: 
     * Author: zhangxiangkai
     * Params: [cstCustomerDetail]
     * ReturnType: java.lang.Boolean
     * Time: 2021/2/17-16:54
     */
    public Boolean addCustumerDetails(CstCustomerDetail cstCustomerDetail);


    /**
     * Description: 根据传入的参数进行分页查询，返回结果集
     * Author: zhangxiangkai
     * Params: [start, rows]
     * ReturnType: java.util.List<cn.softwin.pojo.CstCustomer>
     * Time: 2021/2/18-10:29
     */
    List<CstCustomer> selectByPage(int start, int rows);


    /**
     * Description: 查询数据库内的总行数
     * Author: zhangxiangkai
     * Params: []
     * ReturnType: int
     * Time: 2021/2/18-10:29
     */
    int selectTotalCount();

    /**
     * Description: 根据id删除对应的客户信息
     * Author: zhangxiangkai
     * Params: [custId]
     * ReturnType: boolean
     * Time: 2021/2/18-17:27
     */
    boolean deleteCustomerById(Long custId);

    /**
     * Description: 根据id查询客户详细信息
     * Author: zhangxiangkai
     * Params: [custId]
     * ReturnType: cn.softwin.pojo.CstCustomerDetail
     * Time: 2021/2/18-19:40
     */
    CstCustomerDetail queryCustomerDetailsById(Long custId);

    CstCustomer queryCustomerById(Long custId);

    Boolean updateCustomerById(CstCustomer cstCustomer);

    Boolean updateCustomerDetailById(CstCustomerDetail cstCustomerDetail);
}
